from openpyxl import Workbook,load_workbook
from openpyxl.styles import Font,colors,Alignment

wb = Workbook()  # 创建一个exl
ws = wb.active
# print(ws.title)
#
# ws["B9"] = 'bobo'       """一个个写"""
# ws["C3"] = 'hhhhh'
# ws["C9"] = 'youdade1'
# ws.title='zky和youda'#表格的名字
# wb.save('excel_test.xlsx')#从内存中保存
# wb = load_workbook('excel_test.xlsx')#打开文件
myfont = Font(name="宋体",size=20,italic=True,color=colors.BLUE)
ws["B9"] = "zky"
ws["B9"].font =myfont

wb.save("第二个练习.xlsx")